home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 3 / BBS in a box - Trilogy III.iso / Files / Tele / Hermes / Hermes Toolbox 0.8 ƒ / What's New.p < prev   
Encoding:
Text File  |  1993-05-25  |  10.8 KB  |  158 lines  |  [TEXT/PJMM]

  1. {This is what is new in the new version of Hermes Toolbox}
  2.  
  3. unit WhatsNew;
  4.  
  5. interface
  6.  
  7. {•••••••••••••••••••••••••••New in verion 0.8•••••••••••••••••••••••••••••}
  8.  
  9.     procedure DoTimeDialog (var hour, minute: integer);
  10. {-----------------------------------------------------------------------------------}
  11. {This procedure puts up a dialog similar to that which Hermes uses to enter the time for node}
  12. {start and end time.  It gives the sysop the opportunity to enter time in a manner similar to}
  13. {that used by the Alarm Clock DA and General control panel.  It returns the hour and minute}
  14. {that the sysop entered.  The hour is in 24 hour format so 0 is midnight and 23 is 11 pm.}
  15. {Note that this dialog is modal so it will stop other action on the BBS, but this isn't really a}
  16. {problem since the sysop will  use it rarely. If you use this function you MUST include all}
  17. {the resources included in the file with the same name as this function.  Use ResEdit to copy}
  18. {them to your external's resource file.  There is a text item in this dialog which can be used}
  19. {to prompt the user.  You can either change it with ResEdit or call ParamText and set string}
  20. {number 0 to what you want displayed in that item.}
  21. {-----------------------------------------------------------------------------------}
  22.  
  23.     function StuffitExists: boolean;
  24. {-----------------------------------------------------------------------------------}
  25. {This function will check for the existence of the Stuffit Engine.  The Stuffit Engine is}
  26. {supposed to be kept in the Extensions folder inside the System Folder.  It returns true if the}
  27. {Engine is found and false if not.  Most of the other Stuffit Functions call this one but you}
  28. {should still check before using any of them so you can report back to the user.}
  29. {-----------------------------------------------------------------------------------}
  30.  
  31.     function StuffFile (source, destination: str255; deleteOriginal: boolean): OSErr;
  32. {-----------------------------------------------------------------------------------}
  33. {This function will compress a single file using the Stuffit Engine which is part of the Stuffit}
  34. {Deluxe package.  You should pass the path to the file to be compressed in source and where}
  35. {you want the archive to be placed in destination.  If deleteOriginal is true then the file will}
  36. {be deleted after it has been compressed.   This function does not add .sit to the end of the}
  37. {file name so if you are putting the new archive in the same directory you will need to add}
  38. {it yourself in the destination name.  The fuction returns any OSErr that might take place}
  39. {and returns -1 if the user cancels the operation by hitting the stop button in the Stuffit}
  40. {Engine dialog.  Although this function calls StuffitExists you should before calling it in order}
  41. {to report any errors to the user.}
  42. {-----------------------------------------------------------------------------------}
  43.  
  44.     function TouchFolder (folderPath: str255): OSErr;
  45. {-----------------------------------------------------------------------------------}
  46. {This procedure will chage the last modified date of a folder to the current time and date.}
  47. {This is often useful because it forces the Finder to update all the files in that folder.  Pass}
  48. {it the path to the folder you want to change and it will return any error.}
  49. {-----------------------------------------------------------------------------------}
  50.  
  51.     procedure FlushAllVolumes;
  52. {-----------------------------------------------------------------------------------}
  53. {This procdure will cause all mounted volumes to be immeadiately flushed.  All changes that}
  54. {have been made to files will be written to disk.  This is important because the mac doesn't}
  55. {write to disk until the buffer is full.  If you want to do something especially dangerous or}
  56. {something like shutdown the machine it might be a good idea to call this first.}
  57. {-----------------------------------------------------------------------------------}
  58.  
  59. {•••••••••••••••••••••••••••New in verion 0.7•••••••••••••••••••••••••••••}
  60.  
  61.     function FindUserOnline (userNum: integer; var node: integer; HermSetup: UserXIPtr): boolean;
  62. {-----------------------------------------------------------------------------------}
  63. {This function will return true if the user specified  by userNum  is online.  If true then the}
  64. {node that user is on will be returned in node.}
  65. {-----------------------------------------------------------------------------------}
  66.  
  67.     function NewUserAccount (var newUser: UserRec; HermSetup: UserXIPtr): OSErr;
  68. {-----------------------------------------------------------------------------------}
  69. {This function will create a new user on the BBS.  You can pass a full user record or use}
  70. {WriteUser to flesh it out later.  The new user's user number will be passed back in}
  71. {newUser.userNum.}
  72. {-----------------------------------------------------------------------------------}
  73.  
  74.     procedure CenterDialog (theDialog: DialogPtr);
  75. {-----------------------------------------------------------------------------------}
  76. {This procedure takes a dialog (or window) pointer (which you would get from GetNewDialog)}
  77. {and centers it on the screen.  You should make your dialog 'initially invisable' and call this}
  78. {procedure BEFORE calling ShowWindow.  Otherwise the user will see the dialog move across}
  79. {the screen.}
  80. {-----------------------------------------------------------------------------------}
  81.  
  82.     function DoRegistrationDialog (var bbsName: str255; var registrationNum: longInt): boolean;
  83. {-----------------------------------------------------------------------------------}
  84. {This function will put up a small dialog that will allow the sysop to enter basic registration}
  85. {information.  The dialog has two items, one for a BBS name and one for a registration}
  86. {number.  The function stores these two values in bbsName and registrationNum.  The dialog}
  87. {also has two buttons, one for OK and one for cancel.  The function will return true if the OK}
  88. {buttun is hit and false if cancel is hit.  Note that this dialog is modal so it will stop other}
  89. {action on the BBS, but this isn't really a problem since the sysop will  use it rarely. If you}
  90. {use this function you MUST include all the resources included in the file with the same name}
  91. {as this function.  Use ResEdit to copy them to your external's resource file.}
  92. {-----------------------------------------------------------------------------------}
  93.  
  94.     function GetRegistration (var bbsName: str255; var registrationNum: longInt; resourceName: resType): boolean;
  95. {-----------------------------------------------------------------------------------}
  96. {This function will let you get saved registration information.  It will retrieve the registration}
  97. {information in bbsName and registration number.  You must pass the resourceName that you}
  98. {previously used to save the information.  See SetRegistration for details.  It will return true}
  99. {if it found the resource and false if it did not.  If it did not find the resource you can create a}
  100. {new one by calling SetRegistration.}
  101. {-----------------------------------------------------------------------------------}
  102.  
  103.     procedure SetRegistration (bbsName: str255; registrationNum: longInt; resourceName: resType);
  104. {-----------------------------------------------------------------------------------}
  105. {This procedure will let you save registration information in your external's resource fork.}
  106. {Pass it the bbsName and registrationNum you want to save.  You also need to pass a}
  107. {resource type name.  This simply 4 letters (ie HRMS).  Each external you write should have}
  108. {its own type though to avoid possible conflicts.  Use the same type you use here as in}
  109. {GetRegistration.}
  110. {-----------------------------------------------------------------------------------}
  111.  
  112. {•••••••••••••••••••••••••••New in verion 0.6•••••••••••••••••••••••••••••}
  113.  
  114.     function FindAndReplace (theString: Str255; oldString, newString: Str255): str255;
  115. {-----------------------------------------------------------------------------------}
  116. {This function takes theString and replaces the first occurance of oldString with newString}
  117. {and returns the resulting string.}
  118. {-----------------------------------------------------------------------------------}
  119.  
  120.     function FindAndReplaceAll (theString: Str255; oldString, newString: Str255): str255;
  121. {-----------------------------------------------------------------------------------}
  122. {This function takes theString and replaces the all occurances of oldString with newString}
  123. {and returns the resulting string.}
  124. {-----------------------------------------------------------------------------------}
  125.  
  126.     function CheckCard (cardNum: str255; visa, master, amex, discover: boolean): boolean;
  127. {-----------------------------------------------------------------------------------}
  128. {Yea, yea this is getting strange but I needed it so why not make it avaliable.  This function}
  129. {will take a string representing a credit card number and will determine if the number is in}
  130. {the valid format.  Pass true in the remaining varialbes for each type of credit card that is}
  131. {acceptable.  In other words if you pass false for a varialbe that card type will  not be }
  132. {considered valid.  The cardNum string can have spaces although they are not necessary.}
  133. {All spaces will be ignored when evaluating the number.  This function does three things.}
  134. {First, it checks the first number of the card for the credit card type and sees if that type}
  135. {is accepted.  Second, it makes sure that the number is of the proper number of digits for}
  136. {each type.  Third , it does a checksum on the number to see if it is a possible credit card}
  137. {number. This checksum is fairly involved and is not something you would want to do in}
  138. {your head but it is a good way to check cards.  A number which passes these checks is}
  139. {not necessarily valid (ie it may not be assigned to anyone, stolen etc) but this is a good way}
  140. {to screen out fake numbers and mistakes.}
  141. {-----------------------------------------------------------------------------------}
  142.  
  143.     function CheckExpiration (expirationDate: str255): boolean;
  144. {-----------------------------------------------------------------------------------}
  145. {This function will take an expiration date (in the form MM/YY) and return whether this date}
  146. {has passed yet.  With this and CheckCard, assuming the information is given truthfully, you}
  147. {can confirm the validity of a credit card immeadiately.}
  148. {-----------------------------------------------------------------------------------}
  149.  
  150.     procedure SetMouse (newPoint: Point);
  151. {-----------------------------------------------------------------------------------}
  152. {This procedure will set the cursor to newPoint.  Why you would want to do this is beyond me}
  153. {but I had a reason to do so (the user doesn't ever notice).  This is a really rude thing to do}
  154. {and is a good way to have an program which flops (people hate the mouse moving on them)}
  155. {-----------------------------------------------------------------------------------}
  156.  
  157. implementation
  158. end.